// 前台 发现模块 的axios封装 发请求

import myaxios from './MyAxios.js'

// 服务器地址
const baseUrl = "http://43.136.172.73/api/v1/"

const ShoppingApi = {
	// 查询全部订单
	allOrderList(params) {
		let url = baseUrl + 'order/getOrderListByUserId/' + params
		return myaxios.get(url);
	},
	// 查询已完成订单
	completeOrderList(params) {
		let url = baseUrl + '/order/alikeList';
		return myaxios.get(url, params);
	},

	// 生成订单
	createOrder() {
		let url = baseUrl + '/order/create';
		return myaxios.post(url);
	},

	// 待支付订单
	awaitOrder() {
		let url = baseUrl + '/order/pay';
		return myaxios.post(url)
	},

	// 配送订单
	cancelOrder() {
		let url = baseUrl + '/order/transport';
		return myaxios.post(url)
	},
	//确认收货
	verify(params) {
		let url = baseUrl + '/order/verify/' + params
		return myaxios.get(url);
	},


}

export default ShoppingApi;